package com.jess.arms.base.my;

/**
 * author : Alex
 * e-mail : xys9786@outlook.com
 * date   : 2020/4/1221:48
 * desc   :
 * version: 1.0
 */

public class BaseEntity<T> {

    private int code;
    private String message;
    private T data;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return message;
    }

    public void setMsg(String msg) {
        this.message = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public boolean isSuccess(){
        return code==BaseErrorCoed.SUCCESS_200;
    }

    @Override
    public String toString() {
        return "BaseEntity{" +
                "code=" + code +
                ", msg='" + message + '\'' +
                ", data=" + data +
                '}';
    }
}
